package com.lianliankan.llkan;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;

import com.example.llkan.R;

public class StagePropertyView extends View {
	private Bitmap bitmap;
	private Paint paint = new Paint();

	public StagePropertyView(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
	}

	@SuppressLint("DrawAllocation")
	@Override
	protected void onDraw(Canvas canvas) {
		// bitmap = BitmapFactory.decodeResource(super.getResources(),
		// R.drawable.back);
		paint = new Paint();
		// canvas.drawBitmap(bitmap, 30 , 130 ,paint);
		for (Integer i = 0; i < 3; i++) {
			bitmap = BitmapFactory.decodeResource(super.getResources(),
					R.drawable.sp1 + i);
			paint = new Paint();
			canvas.drawBitmap(bitmap, i * 100 + 30, 0, paint);
		}
		for (Integer i = 3; i < 5; i++) {
			bitmap = BitmapFactory.decodeResource(super.getResources(),
					R.drawable.sp1 + i);
			paint = new Paint();
			canvas.drawBitmap(bitmap, (i - 3) * 100 + 30, 70, paint);
		}
		// TODO Auto-generated method stub

	}

}
